package com.lyl.momanapp.activity;

import android.content.Intent;
import android.view.View;
import android.widget.GridView;

import com.lyl.momanapp.R;
import com.lyl.momanapp.adapter.UserSeJi;
import com.lyl.momanapp.util.view.MyBaseActivity;

/**
 * 名字 梁亚龙
 * 时间 2017/10/17.
 * QQ邮箱 503934353@qq.com
 */

public class UserSeJiActivity extends MyBaseActivity {


    private GridView mGV;

    @Override
    public void initUI() {
        setContentView(R.layout.activity_user_seji);
        mGV = ((GridView) findViewById(R.id.seji));
        findViewById(R.id.fanhui).setOnClickListener(this);
        findViewById(R.id.zhuye).setOnClickListener(this);
    }

    @Override
    public void initData() {
        String[] s = {"1", "1", "1", "1", "1", "1", "1", "1", "1", "1",};
        mGV.setAdapter(new UserSeJi(this, s));
    }

    @Override
    public void addListeners() {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.fanhui: {
                finish();
            }
            break;
            case R.id.zhuye: {
                startActivity(new Intent(UserSeJiActivity.this, MainActivity.class));
            }
            break;
        }
    }
}
